package com.zfk.transaction.service.impl;

import com.zfk.transaction.entity.Location;
import com.zfk.transaction.mapper.LocationMapper;
import com.zfk.transaction.service.LocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LocationServiceImpl implements LocationService {

    @Autowired
    private LocationMapper mapper;

    @Override
    public int addLocation(Location location) {
        return mapper.addLocation(location);
    }

    @Override
    public int deleteLocation(int id) {
        return mapper.deleteLocation(id);
    }

    @Override
    public int updateLocation(Location location) {
        return mapper.updateLocation(location);
    }

    @Override
    public List<Location> getLocations(int user_id) {
        return mapper.getLocations(user_id);
    }
}
